home *** CD-ROM | disk | FTP | other *** search
- Path: news.msn.com!news.compuserve.com
- From: ewl@panix.com (Emery Lapinski)
- Newsgroups: comp.lang.c
- Subject: Re: timer
- Date: 6 Feb 1996 14:03:52 -0800
- Organization: Emery Lapinski, private citizen.
- Message-ID: <4f8j88$oib@panix2.panix.com>
- References: <311000C2.546DE888@applique.sedd.trw.com>
- NNTP-Posting-Host: panix2.panix.com
- X-Forged-Path: I do not want my posts going to compuserve or msn
- X-SpookFood: $200 million in gold bullion M4 Nazi Uzi
- X-ClamFood: [Hello to all my fans in wog surveillance] Power Leipold GREENE NOBODY@REPLAY.COM CARTO 4. ___________________
- X-CanterAndSiegel: Green Cards? Oxygenated Water? Hatred and disgust!
- X-Homepage: http://www.panix.com/~ewl/
- X-Lenny-Bruce: If you can't say 'fuck' you can't say 'fuck the government'
-
- In article <311000C2.546DE888@applique.sedd.trw.com>,
- Ilan Tirer <tireri@applique.sedd.trw.com> wrote:
- >Hi,
- >How would you setup a timer so every 1 minute I can perform some
- >operation.
-
-
- I'd probably do the following:
-
- #include <vport.h>
- #include vtimerHEADER
-
- ...
-
- vtimer *timer=vtimerCreate() ;
- vtimerSetPeriod(timer, 60, 0) ;
- vtimerSetRecurrent(timer) ;
- vtimerSetNotify(timer, vtimerNoteProcToPerformSomeFunction) ;
- vtimerStart(timer) ;
-
- ...
-
- but that probably won't work for you unless you're using the same libraries
- that I'm using.
-
- -emery
- --
- ewl@panix.com | http://www.panix.com/~ewl | "You can have my useless cat(1)
- when you pry it from my cold dead finger(1)." | This work is Copyright 1995
- Emery Lapinski and is freely redistributable by anyone and anything with the
- exception of Microsoft Network. | Telco Bill, make a run for the border.
-